import requests
import re


def get_html_text(url):
    try:
        response = requests.get(url)
        response.raise_for_status()
        return response.text
    except:
        return 'error'


def main():
    pass

data = get_html_text('http://www.baidu.com')
print(data)